package com.lagou.task10;
/*
编程实现方向的枚举
 */

public class Direction {
    private final String desc;//描述方向字符串的成员变量

    //私有化构造方法，只能在本类中使用
    private Direction(String desc){
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }

    public static final Direction UP = new Direction("向上");
    public static final Direction DOWN = new Direction("向下");
    public static final Direction LEFT = new Direction("向左");
    public static final Direction RIGHT = new Direction("向右");


}
